package com.learning.jquizenglish.model;

import java.util.ArrayList;

import com.learning.jquizenglish.model.UserRowModel.ProfileAction;
import com.learning.jquizenglish.model.UserRowModel.RowType;

public class ProfileModel {

	public String id="";
	public String avatar="";
	public String user="";
	public String name="";
	public String living_in="";
	public String about_you="";
	public String mobile="";
	public String dateofbirth="";
	public int total_score;
	public String imei="";
	
	public ArrayList<UserRowModel> convertToListRowModel(){
		ArrayList<UserRowModel> listProfileRow = new ArrayList<UserRowModel>();
		UserRowModel avatarRow = new UserRowModel(avatar, user, RowType.AVATAR, ProfileAction.EDIT_AVATAR,this);
		UserRowModel titleRow = new UserRowModel("Your Info", null, RowType.HEADER, ProfileAction.NONE,this);
		UserRowModel nameRow = new UserRowModel("Your name:", name, RowType.USER_INFO, ProfileAction.EDIT_NAME,this);
		UserRowModel livingRow = new UserRowModel("Living in:", living_in, RowType.USER_INFO, ProfileAction.EDIT_LIVING,this);
		UserRowModel aboutRow = new UserRowModel("About you:", about_you, RowType.USER_INFO, ProfileAction.EDIT_ABOUT,this);
		UserRowModel scoreRow = new UserRowModel("Total score:", String.valueOf(total_score), RowType.USER_INFO, ProfileAction.NONE,this);
		listProfileRow.add(avatarRow);
		listProfileRow.add(titleRow);
		listProfileRow.add(nameRow);
		listProfileRow.add(livingRow);
		listProfileRow.add(aboutRow);
		listProfileRow.add(scoreRow);
		return listProfileRow;
	}
}
